PSA Object Model Diagrams

BillingDocumentService

global with sharing class BillingDocumentService

Methods

BillingDocumentService

global BillingDocumentService()

validateBillingEvents

global static Map<ID, String> validateBillingEvents(BillingDocumentService.CreateBillingDocumentRequest integrationRequest)

Validate billing events for billing document creation. Return any invalid billing events in a map with the relevant error message.

Input Parameters

Name Type Description
integrationRequest BillingDocumentService.CreateBillingDocumentRequest Structure containing the IDs of billing events to be validated.

Return Value

This method returns a map containing the IDs of invalid billing events with their validation error messages. If all the billing events are valid, this method returns an empty map.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

You need to provide some sample code

create

global static List<ID> create(BillingDocumentService.CreateBillingDocumentRequest integrationRequest)

This method creates billing documents for specified billing events synchronously.

Input Parameters

Name Type Description
integrationRequest BillingDocumentService.CreateBillingDocumentRequest Structure containing the IDs of billing events that billing documents will be created for.

Return Value

This method returns a List of billing document IDs that were created for the specified billing events.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

You need to provide some sample code

createAsync

global static Set<ID> createAsync(BillingDocumentService.CreateBillingDocumentRequest integrationRequest)

This method creates billing documents for specified billing events asynchronously.

Input Parameters

Name Type Description
integrationRequest BillingDocumentService.CreateBillingDocumentRequest Structure containing the IDs of billing events that billing documents will be created for.

Return Value

This method returns the IDs of the batch jobs that will create the billing documents.

Sample Code

//Note: This sample code is for demonstration purposes only. It is not intended for
//use in a production environment, is not guaranteed against defects or errors, and
//is in no way optimized or streamlined.

You need to provide some sample code

BillingDocumentService.CreateBillingDocumentRequest

global class CreateBillingDocumentRequest

a structure containing the criteria on which to generate billing documents from billing events.

Properties

Name Type Description
BillingEventIds Set<ID> set of billing event ids.

Methods

CreateBillingDocumentRequest

global CreateBillingDocumentRequest(Set<ID> BillingEventIds)

CreateBillingDocumentRequest

global CreateBillingDocumentRequest()

© Copyright 2009–2021 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.